<?php
class last_news_model extends CI_Model
{
	function __construct(){
        parent::__construct();
	}
	
	function get_all_news($mid, $num=20, $offset=0)
	{
	 $this->db->where('proActive',1);
	 $this->db->where('mID',$mid);
	 $this->db->order_by('datepost','DESC');//'DESC'
	 return $this->db->get('product',$num, $offset)->result();
	}
	
	


}
?>
